package com.project.bean;

/**
 * 订单明细实体类
 *
 * @author lyl
 */
public class OrderInfoBean {
    /**
     * 订单明细id
     */
    private int infoId;
    /**
     * 从属订单
     */
    private OrderBean orderBean;
    /**
     * 购买商品
     */
    private ProductBean productBean;
    /**
     * 购买数量
     */
    private int num;
    /**
     * 商品成交单价
     */
    private int dealPrice;

    public OrderInfoBean() {
    }

    public OrderInfoBean(int orderId, int productId, int num, int dealPrice) {
        this.orderBean = new OrderBean();
        orderBean.setOrderId(orderId);
        this.productBean = new ProductBean();
        productBean.setProductId(productId);
        this.num = num;
        this.dealPrice = dealPrice;
    }

    public int getInfoId() {
        return infoId;
    }

    public void setInfoId(int infoId) {
        this.infoId = infoId;
    }

    public OrderBean getOrderBean() {
        return orderBean;
    }

    public void setOrderBean(OrderBean orderBean) {
        this.orderBean = orderBean;
    }

    public ProductBean getProductBean() {
        return productBean;
    }

    public void setProductBean(ProductBean productBean) {
        this.productBean = productBean;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getDealPrice() {
        return dealPrice;
    }

    public void setDealPrice(int dealPrice) {
        this.dealPrice = dealPrice;
    }

    @Override
    public String toString() {
        return "OrderInfoBean{" +
                "infoId=" + infoId +
                ", orderBean=" + orderBean +
                ", productBean=" + productBean +
                ", num=" + num +
                ", dealPrice=" + dealPrice +
                '}' + "\n";
    }
}
